home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / util / arjndw / arjndw.exe / ARJNDW / ARJNDW.WBT < prev    next >
Text File  |  1992-06-24  |  28KB  |  700 lines

  1. ;ARJNDW Version 1.0 copyright (c) 1992 Joe Newton - June 22 1992
  2. ;
  3. sp = StrCat(Num2Char(32))
  4. crlf = StrCat(Num2Char(13), Num2Char(10))       
  5. i1 = "-i1" ;graph progress display
  6. jt = "-jt" ;test archives
  7. cmd=""       ;arj command
  8. drive=""   ;drive/arjfile
  9. files=""   ;files to arj
  10. howbig=""  ;for arjsfx
  11. w=""       ;-w working directory
  12. wd=""      ;C:\ MAY BE CHANGED TO ANY VALID DRIVE/DIR - IT'S ARJ'S WORKING DIR used with w
  13. u =""      ;-u update
  14. r =""      ;-r recurse subs /r for rearj
  15. d=""       ;for /d with rearj
  16. ji=""      ;-ji index.fil
  17. p=""       ;for -jf & -jf1
  18. e=""       ;-e exclude paths (with add/update)
  19. In=""      ;hold index filename.
  20. Lst=""     ;Included files (written to disk as a list)
  21. comp = ""  ;compression amount -m0 thru m4       
  22. Ex=""      ;Excluded filenames (written to disk as a list)
  23. se = ""    ;variable to :self label
  24. v=""       ;multiple volumes with beep -vv
  25. x=""       ;-x exclude file(s) switch
  26. y=""       ; -y no query to next volume NOT for use with floppies
  27. ask=""     ;AskLine WD
  28. ;temp=Environment("TEMP")
  29. ;DirChange("%TEMP%")
  30. editor = "Nviewer.exe" ; for viewing index
  31. :jwnopen
  32.  
  33. op = FileOpen("xjwnopen","write")
  34. FileWrite(op,"[rbmenu^1 CREATE (or add to) Archive]")
  35. FileWrite(op,"[rbmenu^4 CREATE a SELF-EXTRACTING (EXE) Archive]")
  36. FileWrite(op,"[rbmenu^2 EXTRACT from Archive]")
  37. FileWrite(op,"[rbmenu^0 DELETE file(s) from Archive]")
  38. FileWrite(op,"[rbmenu^3 LIST Archive (including EXE and A0? archives)]")
  39. FileWrite(op,"[rbmenu^5 CONVERT existing archive into a SELF-EXTRACTOR]")
  40. ;;;FileWrite(op,"[rbmenu^6 BACKUP Menu...]") LATER. Must activate restore/view
  41. FileWrite(op,"[rbmenu^7 REARJ (convert) other archives to ARJ archives]")
  42. FileWrite(op,"[rbmenu^8 TEST Integrity of ARJ archive]")
  43. FileWrite(op,"[rbmenu^a Use ZIP, PAK, LHA (LZH extension)
  44. FileWrite(op,"[rbmenu^9 Registration and License Agreement (ONLY $5!)]")
  45. FileWrite(op,"--------------------------------------------")
  46. FileWrite(op,"[cbQU+1 USE Full (create options) Menu...]")
  47. FileWrite(op,"[cbDI+1 USE Working Directory (for use with floppies)]")
  48. FileWrite(op,"[cbTE+1 DISABLE Archive Testing (not recommended)]")
  49. FileClose(op)
  50. DialogBox("ARJ NDW Interface v 1.0 copyright (c) 1992 Joe Newton", "xjwnopen")
  51. if cbDI==@True then ask = AskLine("Working Directory - Speeds up floppy compression","OK for default or Enter new working directory...","C:\")
  52. if cbDI==@True then wd="%ask%"
  53. if cbDI==@true then w="-w"
  54. if cbTE==@True then jt=""
  55. if rbmenu ==1 then goto creation
  56. if rbmenu ==2 then goto extraction
  57. if rbmenu ==3 then goto list
  58. if rbmenu ==4 then se = "self"
  59. if rbmenu ==4 then goto creation
  60. if rbmenu ==5 then  goto arjsfx
  61. if rbmenu ==6 then  goto back
  62. if rbmenu ==7 then goto rearj
  63. if rbmenu ==8 then goto test
  64. if rbmenu ==9 then goto register
  65. if rbmenu ==0 then goto delete
  66. if rbmenu =="a" then goto otherarchives
  67. goto end
  68.  
  69. :delete
  70.  
  71. cmd = "d"
  72. w = ""
  73. wd = ""
  74. jt = ""
  75. drive = AskLine("DELETING file from archive...","Enter the LOCATION and NAME of ARJ archive.","A:\ARJFILE.ARJ")
  76. files = AskLine("DELETING files from archive...","What files would you like to delete? 'WildCards OK'","*.TXT or MYFILE.BAT")
  77. goto run
  78.  
  79. :creation
  80. cmd = "a"
  81. drive = AskLine("Creating new ARJ archive...","Enter LOCATION + NAME of ARJ archive to create.","A:\ARJFILE.ARJ")
  82. a = StrLower("%drive%")
  83. fe = FileExtension("%a%")
  84. if se == "self" then goto exe
  85. if fe == "" then newdrive = "%a%.arj"
  86. if fe == "exe" then newdrive = "%a%"
  87. if fe == "arj" then newdrive = "%drive%" ;CHANGED THIS FROM NEWDRIVE =="%a%"
  88. goto afterexe
  89.  
  90. :exe
  91. if fe == "" then newdrive = "%a%.exe"
  92. if fe == "exe" then newdrive = "%drive%" ;CHANGED FROM "%a%" to "%drive%"
  93. if fe == "arj" then newdrive = "%drive%" ;ALSO CHANGED
  94.  
  95. :afterexe
  96. exist = FileExist("%newdrive%")
  97. ask = ""
  98. if exist == @True then beep
  99. if exist == @True then ask = AskYesNo("CheckPoint!","%newdrive% already exists. Continue?")
  100. if exist == @True && ask == @No then exit
  101. if cbQU == "1" then files = AskLine("Creating new ARJ archive...","Enter the DIRECTORY to ARJ...","C:\MYDIR\")
  102. if cbQU == "0" then files = AskLine("Creating new ARJ archive...","Enter the DIRECTORY and FILES to ARJ.","C:\MYDIR\*.*")
  103. if cbQU == "0" then goto run
  104. goto createoptions
  105.  
  106. :extraction
  107. cmd = "e"
  108. w = ""
  109. wd = ""
  110. jt = ""
  111. drive = AskLine("Extracting from ARJ archive...","Enter the LOCATION and NAME of ARJ archive.","A:\ARJFILE.ARJ")
  112. files = AskLine("Extracting from ARJ archive...","Where do you want the EXTRACTED files to go?","C:\ or C:\MYDIR")
  113. goto extoptions
  114.  
  115.  
  116. :list
  117. cmd = "l"
  118. files = ""
  119. drive = AskLine("Listing ARJ archive...","Enter the LOCATION and NAME of ARJ archive. ","A:\ARJFILE.ARJ")
  120.  
  121. ask = AskYesNo("Listing ARJ archive...","List ALL files in Archive?")
  122. if ask == @No then files = AskLine("Listing ARJ archive...","Enter archive files to list. Put a SPACE between each (OK=ALL)","MYFILE.FIL *.CAT")
  123. if files ==  "MYFILE.FIL *.CAT" then files = "*.*"
  124. if files == "%sp%" then files = "*.*"
  125. goto runlist
  126.  
  127. :createoptions
  128. choice = FileOpen("xjwnch","write")
  129. FileWrite(choice,"[rbchomp^1 GOOD Compression (default)]")
  130. FileWrite(choice,"[rbchomp^2 MAXimum Compression]")
  131. FileWrite(choice,"[rbchomp^3 FASTER MAXimum Compression]")
  132. FileWrite(choice,"[rbchomp^4 LESS Compression and Memory]")
  133. FileWrite(choice,"[rbchomp^5 FAST! Less Compression]")
  134. FileWrite(choice,"[rbchomp^6 FASTEST! Least Compression]")
  135. FileWrite(choice,"[rbchomp^7 STORE ONLY No compression]")
  136. FileClose(choice)
  137. DialogBox("Compression...", "xjwnch")
  138. if rbchomp ==1 then comp = ""
  139. if rbchomp ==2 then comp = "-jm"
  140. if rbchomp ==3 then comp = "-jm1"
  141. if rbchomp ==4 then comp = "-m2"
  142. if rbchomp ==5 then comp = "-m3"
  143. if rbchomp ==6 then comp = "-m4"
  144. if rbchomp ==7 then comp = "-m0"
  145.  
  146. dlg=FileOpen("xjwnopt", "write")
  147. FileWrite(dlg,"[cbRe+1 Recurse Subdirectories]")                        
  148. FileWrite(dlg,"[cbUp+1 Update (Add New and Newer Files Only)")
  149. FileWrite(dlg,"[cbLi+1 Add Listed Files Only...]")
  150. FileWrite(dlg,"[cbEx+1 Exclude Listed Files...]")                       
  151. FileWrite(dlg,"[cbIn+1 Create Index File List...]")
  152. FileWrite(dlg,"[cbMv+1 Enable Multiple Volumes...]")
  153.  
  154. FileWrite(dlg,"")
  155. FileWrite(dlg,"[rbPa^1 Include Pathnames (default)]") ;  (Ex: mydir\*.*)] ") p="" 
  156. FileWrite(dlg,"[rbPa^2 Do NOT Include Pathnames]")   ; (add files only)]")  p=-e 
  157. FileWrite(dlg,"")
  158. FileWrite(dlg,"Note:  Paths may be stripped on extraction...")
  159. FileClose(dlg)
  160.  
  161. :createoptions2
  162. DialogBox("Main Options...","xjwnopt")
  163. if cbRe == @True then r = "-r"
  164. if cbUp == @True then  u = "-u"
  165. if cbUp == @True && rbmenu == 4 then message("Update option has been changed...","To update Self-Extracting archives use the CREATE ARCHIVE selection NOT create Self-Extractor. Archive will NOT be updated...")
  166. if cbMv == @True && rbmenu == 4 then message("Multiple Volume Selection Has Been Changed.","Self-Extracting archives may not contain Multiple Volumes...")
  167. if exist == @True && cbMv == 1 then u = "-u"
  168. if cbUp == @True && rbmenu == 4 then u = ""
  169. if cbMv == @True && rbmenu == 4 then v = ""
  170. If cbLi == @True then Lst = AskLine("Create/Update Archive...","Enter file(s) to ARJ (Enter/OK=ALL)","*.BAT *.EXE *.BRD")
  171. If Lst == "*.BAT *.EXE *.BRD" then Lst = ""
  172. If Lst == "%sp%" then Lst="" ;added
  173. if Lst == "" then goto except
  174. stronly = strReplace(Lst," ",crlf)
  175. wr = FileOpen("xjwnzlst.lst","write")
  176. FileWrite(wr,"%stronly%")
  177. FileClose(wr)
  178. Lst="!xjwnzlst.lst"
  179.  
  180. :except
  181. if cbEx == @True then Ex = AskLine("These files will NOT be ARJed","Enter files to Exclude. Multiple exclusions are allowed. Put a SPACE between each...","MYFILE.TXT *.BAT \WP51\MYDIR")
  182. if Ex == "MYFILE.TXT *.BAT \WP51\MYDIR" then Ex =""
  183. if Ex == "%sp%" then Ex=""
  184. if Ex == "" then goto volumes
  185.  
  186. str1 = strReplace(Ex," ",crlf)
  187. wr = FileOpen("xjwnz.lst","write")
  188. FileWrite(wr,"%str1%")
  189. FileClose(wr)
  190. x="-x!xjwnz.lst"
  191.  
  192. :volumes
  193. if se == "self" then goto next
  194. if cbMv == @False then goto next
  195. vol = FileOpen("xjwnmv","write")
  196. FileWrite(vol,"[rbMv^1 Auto Sense Disk Space]")
  197. FileWrite(vol,"[rbMv^2 1.2M (5.25 HC)]")
  198. FileWrite(vol,"[rbMv^3 1.44M (3.5 HC)]")
  199. FileWrite(vol,"[rbMv^4 360k (5.25 DD)]")
  200. FileWrite(vol,"[rbMv^5 720k (3.5 DD)]")
  201. FileWrite(vol,"")
  202. FileWrite(vol,"[cbMvv+1 Do NOT prompt for volumes (default=prompt)]")
  203. FileWrite(vol,"         Floppies MUST prompt...")
  204. FileClose(vol)
  205. dialogBox("Multiple Volumes...","xjwnmv")
  206. if rbMv == 1 then v= "-vva"
  207. if rbMv == 2 then v= "-vv1200"
  208. if rbMv == 3 then v= "-vv1440"
  209. if rbMv == 4 then v= "-vv360"
  210. if rbMv == 5 then v= "-vv720"
  211. if cbMvv == @True then y = "-y"
  212.  
  213. :next
  214. if cbIn == @True then In = AskLine("Create Index File...","Enter Index Filename","\index.fil")
  215. if cbIn == @True then ji = "-ji"
  216. if In == "" then ji = ""
  217. if In == "%sp%" then ji = ""
  218. if rbPa == 1 then p = ""
  219. if rbPa == 2 then p = "-e"
  220. if cbIn == @False then goto run
  221.                                          
  222. :error                                   ;used for creation & extraction
  223. ask = @Yes
  224. ask2 = @Yes
  225. err1 = FileExist("%In%")
  226. if err1 == @True then ask = AskYesNo("Index filename MUST be unique","%In% already exists. Append to it?") ;do or don't append
  227. if ask == @Yes then goto run
  228. if err1 == @True && ask == @No then ask2 = AskYesNo("Index filename MUST be unique","Overwrite %In%?")
  229. if ask == @No && ask2 == @Yes then FileDelete("%In%")
  230. if ask2 == @No then In = AskLine("Index filename MUST be unique","Enter new Index FileName (Enter/OK = None)","")
  231. if In == "" then ji=""
  232. if In !="" then err1 = FileExist("%In%")
  233. if err1 == @True then goto error
  234. goto run
  235.  
  236. :extoptions
  237. dlg=FileOpen("xjwnopt", "write")
  238. FileWrite(dlg,"[cbUp+1 Update Disk (Extract New or Newer Files Only)")
  239. FileWrite(dlg,"[cbLi+1 Extract Listed Files Only...]")
  240. FileWrite(dlg,"[cbEx+1 Exclude Listed Files...]")                       
  241. FileWrite(dlg,"[cbIn+1 Create Index File List...]")                     
  242. FileWrite(dlg,"[cbMv+1 Enable Multiple Volumes]")
  243. FileWrite(dlg,"")
  244. FileWrite(dlg,"[rbPa^1  ARJ E - Do NOT extract Pathnames]")  
  245. FileWrite(dlg,"[rbPa^2  ARJ X - Extract With Pathnames (if exists)]")        ;   (Ex: dir\*.*)  (ARJ X))     cmd=x LATER
  246. FileWrite(dlg,"")
  247. FileClose(dlg)
  248. DialogBox("Choose Options...","xjwnopt")
  249. if cbUp == @True then  u = "-u"
  250. if cbMv == @True then v = "-vv"
  251. if cbIn == @True then ji = "-ji"
  252. If cbLi == @True then Lst = AskLine("Extracting Files...","Enter files to extract...","MYFILE.TXT or *.BAT")
  253. If Lst == "MYFILE.TXT or *.BAT" then Lst = ""
  254. if cbEx == @True then Ex = AskLine("These files will NOT be ARJed","Enter files to Exclude.  Multiple exclusions are allowed.  Put a SPACE between each...","MYFILE.TXT *.BAT \WP51\MYDIR")
  255. if Ex == "MYFILE.TXT *.BAT \WP51\MYDIR" then Ex =""
  256. if Ex == "%sp%" then Ex = ""
  257. if Ex == "" then goto exnext
  258. str1 = strReplace(Ex," ",crlf)
  259. wr = FileOpen("xjwnz.lst","write")
  260. FileWrite(wr,"%str1%")
  261. FileClose(wr)
  262. x="-x!xjwnz.lst"
  263.  
  264. :exnext
  265. if rbPa == 1 then cmd = "e"
  266. if rbPa == 2 then cmd = "x"
  267. if cbIn == @False then In = ""
  268. if cbIn == @True then In = AskLine("Create Index File","Enter Index Filename","\index.fil")
  269. if cbIn == @True then goto error
  270. ask = @Yes
  271.  
  272. :run
  273. if se == "self" then goto arjsfx
  274. ClipPut("%cmd% %drive% %files% %Lst% %r% %ji%%In% %u% %y% %comp% %p% %x% %v% %i1% %jt% %w%%wd%")
  275. Call("jwnrun.wbt","")
  276. Delay(3)
  277. goto end
  278.  
  279. :runlist
  280. ClipPut("%cmd% %drive% %Files% %Lst% -v -jixjwnlst.txt")
  281. Call("jwnrun.wbt","")
  282. delay(3)
  283. run("%editor%","xjwnlst.txt")
  284. Message("Remember...","If you ran ARJSETUP.WBT to install, ARJNDW.BAT has been associated with ARJ archives allowing you to double-click any ARJ archives(except self-extracting .exe files) in any drive window to view their contents...")
  285. errormode (@off)
  286. FileDelete("xjwnopen")
  287. FileDelete("xjwnbk")
  288. FileDelete("xjwnch")
  289. FileDelete("xjwnopt")
  290. FileDelete("xjwnz.lst")
  291. FileDelete("xjwnconv")
  292. FileDelete("xjwnmv")
  293. FileDelete("xjwnzlst.lst")
  294. FileDelete("xjwnlst.txt")
  295. exit
  296.  
  297. :arjsfx
  298. dlg = FileOpen("xjwnconv","write")
  299. Filewrite(dlg,"[rbCo^1ARJSFX - Larger in size, but FULL FEATURED)]")
  300. Filewrite(dlg,"[rbCo^2ARJSFXJR  Smaller, but does NO PROMPTING )]")
  301. Filewrite(dlg,"")
  302. Filewrite(dlg,"ARJSFXJR will create directories and files")
  303. Filewrite(dlg,"without prompting the user. If there are no")
  304. Filewrite(dlg," pathnames it will extract to the directory in")
  305. Filewrite(dlg,"which it is executed - WITHOUT PROMPTING.")
  306. Filewrite(dlg,"It will NOT overwrite existing files...")
  307. Fileclose(dlg)
  308. Dialogbox("Choose One...","xjwnconv")
  309. if rbCo == 1 then howbig = "-je"
  310. if rbCo == 2 then howbig = "-je1"
  311. if se == "self" then goto self
  312.  
  313. :conv
  314. ask = ""
  315. drive = AskLine("Converting ARJ archive to SELF EXTRACTOR...","Enter LOCATION + NAME of ARJ archive to create.","A:\ARJFILE.ARJ")
  316. a = StrLower("%drive%")
  317. fe = FileExtension("%a%")
  318. if fe == "" then newdrive = "%a%.arj"
  319. if fe == "arj" then newdrive = "%drive%"
  320. exist = FileExist("%newdrive%")
  321. ask = ""
  322. if exist == @False then beep
  323. if exist == @False then ask = message("CheckPoint!","File could not be found. Check File path/name...")
  324. if ask == "1" then goto conv
  325. ClipPut("y %drive% %howbig% -jt")
  326. Call("jwnrun.wbt","")
  327. Delay(3)
  328. Message("Converting Arj Archive...","A COPY of %drive% has been converted to a Self-Extracting (EXE) file.")
  329. ErrorMode(@Off)
  330. FileDelete("xjwnopen")
  331. FileDelete("xjwnconv")
  332. exit
  333.  
  334. :self
  335. if comp == "-m4" then comp = "-m3"
  336. ClipPut("%cmd% %drive% %files% %Lst% %r% %howbig% %ji%%In% %u% %comp% %p% %x% %i1% %jt% %w%%wd%")
  337. Call("jwnrun.wbt","")
  338. Delay(3)
  339. goto end
  340.  
  341. :rearj
  342. ask = ""
  343. drive = AskLine("REARJing Other Archives...","Enter LOCATION + NAME of archive to REARJ. Wildcards OK (*.zip)","A:\MYFILE.ZIP or *.PAK or *.LZH or *.ARC")
  344. ask = AskYesNo("REARJing Other Archives..","Delete %drive% after REARJing?")
  345. if ask == @Yes then d = "/d"
  346. ClipPut("%drive% %d%")
  347. Call("JWNREAR.WBT","")
  348. Delay(3)
  349. ErrorMode(@Off)
  350. FileDelete("xjwnopen")
  351. ErrorMode(@On)
  352. Exit
  353.  
  354. :test
  355. drive = AskLine("Testing ARJ archive...","Enter the LOCATION and NAME of ARJ archive.","A:\ARJFILE.ARJ")
  356. ClipPut("t %drive%")
  357. Call("JWNRUN.WBT","")
  358. Delay(3)
  359. ErrorMode(@Off)
  360. Exit
  361.  
  362. :register
  363. ask = FileExist("%editor%")
  364. if ask == @False then Message("Registration","Editor could not found. Please see ARJNDW.TXT")
  365. if ask == @False then goto end
  366. ErrorMode(@Off)
  367. dlg=FileOpen("HOWTOREG.TXT","write")
  368. FileWrite(dlg,"           ARJ/NDW Interface copyright (c) 1992 Joe Newton")
  369. FileWrite(dlg,"")
  370. FileWrite(dlg,"Though not mandatory, If you find ArjNdw useful a registration fee of $5")
  371. FileWrite(dlg,"would be greatly appreciated. In any event, thanks for giving it a try.")
  372. FileWrite(dlg,"")
  373. FileWrite(dlg,"Please send a check or money order to:")
  374. FileWrite(dlg,"")
  375. FileWrite(dlg,"                                Joe Newton")
  376. FileWrite(dlg,"                          Eye of Newt Productions")
  377. FileWrite(dlg,"")
  378. FileWrite(dlg,"   5540 Balboa Boulevard            OR            2619 Wegworth Lane")
  379. FileWrite(dlg,"   Encino, CA 91316-1505                          Baltimore, MD 21230")
  380. FileWrite(dlg,"")
  381. FileWrite(dlg,"")
  382. FileWrite(dlg,"Include your address and I'll keep you posted on ArjNdw updates as well")
  383. FileWrite(dlg,"as other useful interfaces and utilities. If you have an ARJ option that")
  384. FileWrite(dlg,"you use regularly that was NOT included in ArjNdw, and would like it to")
  385. FileWrite(dlg,"be, contact me at one of the following numbers or the address above. I'm")
  386. FileWrite(dlg,"certainly not a Batchrunner or Arj expert, but I've gotten to know both")
  387. FileWrite(dlg,"pretty well with this little project and may be able to help you tweak")
  388. FileWrite(dlg,"ArjNdw to your specs. I can be reached via modem @The Murph Zone (818)")
  389. FileWrite(dlg,"766-7669, a free BBS in the San Fernando Valley, CA where I check in")
  390. FileWrite(dlg,"regularly and @Compuserve #71500,140 (checked infrequently), and I")
  391. FileWrite(dlg,"occasionally modem in on Symantec's BBS in San Jose.")
  392. FileWrite(dlg,"")
  393. FileWrite(dlg,"A Personal Note...")
  394. FileWrite(dlg,"My primary business is music, and that includes MIDI. I'm a BMI")
  395. FileWrite(dlg,"composer, SAG vocalist and spent several years on the road moving")
  396. FileWrite(dlg,"through 37 states. For the past five years, I've been providing MIDI")
  397. FileWrite(dlg,"music services.  I'll always be involved with music, and I'll always be")
  398. FileWrite(dlg,"involved with computers. I'm hoping to find a niche in the coming")
  399. FileWrite(dlg,"multimedia explosion. If you've got an interesting music, computer or")
  400. FileWrite(dlg,"multimedia project brewing please drop me a line!")
  401. FileWrite(dlg,"")
  402. FileWrite(dlg,"")
  403. FileWrite(dlg,"Thank you for your support. I'd also like to thank Robert K Jung for the")
  404. FileWrite(dlg,"BEST compression program I've ever had the pleasure to use - ARJ, and")
  405. FileWrite(dlg,"Peter Norton's group and Symantec. I've always been a dedicated DOS user")
  406. FileWrite(dlg,"but Norton Desktop for Windows sold me on Windows as well...")
  407. FileWrite(dlg,"")
  408. FileWrite(dlg,"")
  409. FileWrite(dlg,"                 ...Now for the legal mumbo/jumbo...")
  410. FileWrite(dlg,"          BY USING THIS PROGRAM YOU AGREE TO THE FOLLOWING:")
  411. FileWrite(dlg,"")
  412. FileWrite(dlg,"You are free to use, copy and distribute ARJNDW as long as no fee is")
  413. FileWrite(dlg,"charged or collected. You may use ARJNDW on any and all computers YOU")
  414. FileWrite(dlg,"use. You may modify ARJNDW for your personal use. Any modifications")
  415. FileWrite(dlg,"made by you must be clearly labeled as YOUR modification. You may NOT")
  416. FileWrite(dlg,"copy or distribute any modified version of ARJNDW without WRITTEN")
  417. FileWrite(dlg,"PERMISSION from the author. I've taken great care to ensure the program")
  418. FileWrite(dlg,"performs as stated. Still, I cannot guarantee this will be the case on")
  419. FileWrite(dlg,"every system. As such, you agree NOT to hold me responsible for ANY")
  420. FileWrite(dlg,"damages directly or indirectly related to the use of ARJNDW. Finally, it")
  421. FileWrite(dlg,"is YOUR responsibility to ensure your copy of ARJNDW is virus free.")
  422. FileWrite(dlg,"")
  423. FileWrite(dlg,"               IF YOU DO NOT AGREE TO THE FOREGOING, ")
  424. FileWrite(dlg,"            YOU ARE NOT AUTHORIZED TO USE THIS PRODUCT.")   
  425. FileWrite(dlg,"")
  426. FileWrite(dlg,"")
  427. FileWrite(dlg,"")
  428. FileWrite(dlg,"jwnarjndw")
  429. FileClose(dlg)
  430. Run("%editor%","HOWTOREG.TXT")
  431. ErrorMode(@On)
  432. :end
  433. If In !="" then ask = AskYesNo("CheckPoint!","Load Index File (%In%)?")
  434. If In !="" && ask == @Yes then Display(1,"Index File","Loading %In%...")
  435. if In != "" && ask ==@Yes then Run("%editor%","%In%")
  436. errormode (@off)
  437. FileDelete("xjwnopen")
  438. FileDelete("xjwnbk")
  439. FileDelete("xjwnch")
  440. FileDelete("xjwnopt")
  441. FileDelete("xjwnz.lst")
  442. FileDelete("xjwnconv")
  443. FileDelete("xjwnmv")
  444. FileDelete("xjwnzlst.lst")
  445. exit
  446.  
  447.  
  448. :otherarchives
  449. other = FileOpen("xjwnopen","write")
  450. FileWrite(other,"Choose Archive...")
  451. FileWrite(other,"")
  452. FileWrite(other,"[rbother^1 ZIP]")
  453. FileWrite(other,"[rbother^2 PAK]")
  454. FileWrite(other,"[rbother^3 LHA (LZH extension)]")
  455. FileClose(other)
  456. DialogBox("ARJ NDW (c) 1992 Joe Newton", "xjwnopen")
  457. if rbother==1 then goto zip
  458. if rbother==2 then goto pak
  459. if rbother==3 then goto lha
  460.  
  461. :zip
  462. op = FileOpen("xjwnopen","write")
  463. FileWrite(op,"[zipmenu^1 CREATE (or add to) Archive]")
  464. FileWrite(op,"[zipmenu^2 EXTRACT from Archive]")
  465. FileWrite(op,"[zipmenu^3 DELETE files from archive]")
  466. FileWrite(op,"[zipmenu^5 CONVERT ZIP archive into a SELF-EXTRACTOR]")
  467. FileWrite(op,"[zipmenu^6 VIEW contents of Archive]")
  468. FileWrite(op,"[zipmenu^9 How To Register ARJ/NDW (it's ONLY $5.00!)]")
  469. FileWrite(op,"")
  470. FileClose(op)
  471. DialogBox("ARJ NDW Interface copyright (c) 1992 Joe Newton", "xjwnopen")
  472. if zipmenu ==1 then goto zipcreation
  473. if zipmenu ==2 then goto zipextraction
  474. if zipmenu ==3 then goto zipdelete
  475. if zipmenu ==5 then goto zipsfx
  476. if zipmenu ==6 then goto zipview
  477. if zipmenu ==9 then goto register
  478. goto end
  479.  
  480. :zipview
  481. drive = AskLine("View Contents of ZIP archive...","Enter LOCATION + NAME of ZIP archive to view...","A:\ZIPFILE.ZIP")
  482. a = StrLower("%drive%")
  483. fe = FileExtension("%a%")
  484. if fe == "" then drive = "%a%.zip"
  485. if fe == "zip" then drive = "%drive%"
  486. exist = FileExist("%drive%")
  487. if exist == "0" then Message("CheckPoint!","Zip archive could not be found. Please try again...")
  488. if exist == "0" then goto view
  489. run("nviewer.exe","%drive%")
  490. goto end 
  491. exit
  492.  
  493. :zipdelete
  494. d="-d"
  495. drive = AskLine("Delete files from ZIP archive...","Enter LOCATION + NAME of ZIP archive.","A:\ZIPFILE.ZIP")
  496. a = StrLower("%drive%")
  497. fe = FileExtension("%a%")
  498. if fe == "" then drive = "%a%.zip"
  499. if fe == "zip" then drive == "%drive%"
  500. exist = FileExist("%drive%")
  501. if exist == "0" then Message("CheckPoint!","Zip archive could not be found. Please try again...")
  502. if exist == "0" then goto delete
  503.  
  504. :zipdelfiles
  505. files = AskLine("Delete files from ZIP archive...","Enter File(s) to DELETE (wildcards OK).","MYFILE.*")
  506. if files == "MYFILE.*" then files = ""
  507. if files == "" then message("CheckPoint!","Files to Delete MUST be entered. Please try again...")
  508. if files == "" then goto zipdelfiles
  509. goto ziprun
  510. exit
  511.  
  512. :zipcreation
  513. ;get dir's & files
  514. ask = "ask"
  515. drive = AskLine("Creating new ZIP archive...","Enter LOCATION + NAME of ZIP archive to create.","A:\ZIPFILE.ZIP")
  516. a = StrLower("%drive%")
  517. fe = FileExtension("%a%")
  518. if fe == "" then newdrive = "%a%.zip"
  519. if fe == "exe" then newdrive = "%a%"
  520. if fe == "zip" then newdrive = "%drive%"
  521. there = FileExist("%newdrive%")
  522. if there == "1" then beep
  523. if there == "1" then ask = AskYesNo("Continuing will Update or Add to %newdrive%...","%newdrive% exists. Continue?")
  524. if ask == "0" then goto zipcreation
  525. files = AskLine("Creating new ZIP archive...","Enter the LOCATION + FILES to ZIP (wildcards OK).","C:\MYDIR\*.*")
  526.  
  527. ;get options
  528. choice = FileOpen("xjwnch","write")
  529. FileWrite(choice,"[rbamount^1 Save Time]")
  530. FileWrite(choice,"[rbamount^2 Save Space]")
  531. FileWrite(choice,"")
  532. FileWrite(choice,"[cbReZ+1 Recurse Subdirectories]")                        ;zip
  533. FileWrite(choice,"")
  534. FileWrite(choice,"[rbPaZ^1 Do NOT Include Pathnames (default)]")
  535. FileWrite(choice,"[rbPaZ^2 INCLUDE Recursed Pathnames]") ;SPECIFIED & RECURSED INTO
  536. FileClose(choice)
  537. DialogBox("ZIP Options...", "xjwnch")
  538. if rbamount ==1 then comp = "-es"
  539. if rbamount ==2 then comp = "-ex"
  540. if cbReZ ==1 then r = "-r"
  541. if rbPaZ == 1 then p = ""
  542. if rbPaZ == 2 then p = "-p" ;SPECIFIED & RECURSED INTO
  543. goto ziprun
  544.  
  545. :zipextraction
  546. w = ""
  547. wd = ""
  548. drive = AskLine("Extracting from ZIP archive...","Enter the LOCATION and NAME of ZIP archive.","A:\ZIPFILE.ZIP")
  549. files = AskLine("Extracting from ZIP archive...","Where do you want the EXTRACTED files to go?","C:\ or C:\MYDIR")
  550.  
  551. ;get extoptions
  552. dlg=FileOpen("xjwnopt", "write")
  553. FileWrite(dlg,"")
  554. FileWrite(dlg,"[rbdir^1  Do NOT create stored directories (if exists)]")  
  555. FileWrite(dlg,"[rbdir^2  CREATE stored directories (if exists)]")        ;   (Ex: dir\*.*)  (ZIP X))     cmd=x LATER
  556. FileWrite(dlg,"")
  557. FileClose(dlg)
  558. DialogBox("Choose Options...","xjwnopt")
  559. :exnext
  560. if rbdir == 1 then p = ""
  561. if rbdir == 2 then p = "-d"
  562. goto ziprun
  563.  
  564. :ziprun
  565. ClipPut("%drive% %d% %r% %comp% %p% %files%")
  566. if zipmenu =="2" then Call("jwnunzip.wbt","")
  567. if zipmenu !="2" then Call("jwnzrun.wbt","")
  568. Delay(3)
  569. goto end
  570.  
  571. :zipsfx
  572. ask = ""
  573. drive = AskLine("Converting ZIP archive to SELF EXTRACTOR...","Enter LOCATION + NAME of ZIP archive to create.","A:\ZIPFILE.ZIP")
  574. a = StrLower("%drive%")
  575. fe = FileExtension("%a%")
  576. if fe == "" then newdrive = "%a%.zip"
  577. if fe == "zip" then newdrive = "%drive%"
  578. exist = FileExist("%newdrive%")
  579. ask = ""
  580. if exist == @False then beep
  581. if exist == @False then ask = message("CheckPoint!","File could not be found. Check File path/name...")
  582. if ask == "1" then goto conv
  583.  
  584. :zipwhereto
  585. location = AskLine("Converting ZIP archive to SELF EXTRACTOR...","Place the EXE file in WHAT directory?","C:\MYDIR")
  586. ;if location == "C:\MYDIR" then message("CheckPoint!","Destination Directory MUST be entered. Please try again...")
  587. ;if location == "C:\MYDIR" then goto whereto
  588. ClipPut(" %drive%")
  589. ErrorMode(@Off)
  590. dc = DirChange("%location%")
  591. ErrorMode(@On)
  592. if dc == "0" then Message("CheckPoint!","Destination Directory NOT found. Check spelling and try again...")
  593. if dc == "0" then goto zipwhereto
  594. Call("jzip2exe.wbt","")
  595. Delay(3)
  596. ErrorMode(@Off)
  597. FileDelete("xjwnopen")
  598. FileDelete("xjwnconv")
  599. exit
  600. ;;;end was here
  601.  
  602.  
  603. :lha
  604. choice = FileOpen("xjwnch","write")
  605. FileWrite(choice,"Choose One...")
  606. FileWrite(choice,"")
  607. FileWrite(choice,"[rblha^1 Create LHA archive]")
  608. FileWrite(choice,"[rblha^2 Extract from LHA archive]")
  609. FileWrite(choice,"")
  610. FileClose(choice)
  611. DialogBox("ArjNdw Interface...","xjwnch")
  612. if rblha ==1 then goto lhacreate
  613. if rblha ==2 then goto lhaextract
  614.  
  615. :lhacreate
  616. ask = "ask"
  617. drive = AskLine("Creating new LZH archive...","Enter LOCATION + NAME of LZH archive to create.","A:\ZIPFILE.LHA")
  618. a = StrLower("%drive%")
  619. fe = FileExtension("%a%")
  620. if fe == "" then newdrive = "%a%.lzh"
  621. if fe == "lzh" then newdrive = "%drive%"
  622. there = FileExist("%newdrive%")
  623. if there == "1" then beep
  624. if there == "1" then ask = AskYesNo("Continuing will Update or Add to %newdrive%...","%newdrive% exists. Continue?")
  625. if ask == "0" then goto lhacreate
  626. files = AskLine("Creating new LZH archive...","Enter the LOCATION + FILES to LZH (wildcards OK).","C:\MYDIR\*.*")
  627. ClipPut("A %newdrive% %files%")
  628. Call("jwnlrun.wbt","")
  629. goto end 
  630.  
  631. :lhaextract
  632. ;;;FILEEXIST ERROR CHECKING IS DIFFERENT FOR EXTRACTING
  633. ask = "ask"
  634. drive = AskLine("Extracting from LHA archive...","Enter LOCATION + NAME of LHA archive...","A:\MYFILE.LHA")
  635. a = StrLower("%drive%")
  636. fe = FileExtension("%a%")
  637. if fe == "" then newdrive = "%a%.lzh"
  638. if fe == "lzh" then newdrive = "%drive%"
  639. there = FileExist("%newdrive%")
  640. if there == "0" then beep
  641. if there == "0" then ask = Message("CheckPoint!","LHA archive NOT found please try again...")
  642. if there == "0" then goto lhaextract
  643. drive = AskLine("Extracting from LHA archive...","Extract to what directory...","C:\MYDIR")
  644. files = AskLine("Extracting from LHA archive...","Enter the FILES to extract (wildcards OK).","*.*")
  645. ClipPut("E %newdrive% %files%")
  646. Call("jwnlrun.wbt","")
  647. goto end 
  648. exit
  649.  
  650. :pak
  651. choice = FileOpen("xjwnch","write")
  652. FileWrite(choice,"Choose One...")
  653. FileWrite(choice,"")
  654. FileWrite(choice,"[rbpak^1 Create PAK archive]")
  655. FileWrite(choice,"[rbpak^2 Extract from PAK archive]")
  656. FileWrite(choice,"")
  657. FileClose(choice)
  658. DialogBox("ArjNdw Interface...","xjwnch")
  659. if rbpak ==1 then goto pakcreate
  660. if rbpak ==2 then goto pakextract
  661.  
  662. :pakcreate
  663. ask = "ask"
  664. drive = AskLine("Creating new pak archive...","Enter LOCATION + NAME of PAK archive to create.","A:\ZIPFILE.PAK")
  665. a = StrLower("%drive%")
  666. fe = FileExtension("%a%")
  667. if fe == "" then newdrive = "%a%.pak"
  668. if fe == "pak" then newdrive = "%drive%"
  669. there = FileExist("%newdrive%")
  670. if there == "1" then beep
  671. if there == "1" then ask = AskYesNo("Continuing will Update or Add to %newdrive%...","%newdrive% exists. Continue?")
  672. if ask == "0" then Exit
  673. files = AskLine("Creating new PAK archive...","Enter the LOCATION + FILES to PAK (wildcards OK).","C:\MYDIR\*.*")
  674. ClipPut("A %newdrive% %files%")
  675. Call("jwnprun.wbt","")
  676. goto end 
  677. exit
  678.  
  679. :pakextract
  680. ;;;FILEEXIST ERROR CHECKING IS DIFFERENT FOR EXTRACTING
  681. ask = "ask"
  682. drive = AskLine("Extracting from PAK archive...","Enter LOCATION + NAME of PAK archive...","A:\ZIPFILE.PAK")
  683. a = StrLower("%drive%")
  684. fe = FileExtension("%a%")
  685. if fe == "" then newdrive = "%a%.pak"
  686. if fe == "pak" then newdrive = "%drive%"
  687. there = FileExist("%newdrive%")
  688. if there == "0" then beep
  689. if there == "0" then ask = Message("CheckPoint!","PAK archive NOT found please try again...")
  690. if ask == "0" then goto pakextract
  691. drive = AskLine("Extracting from PAK archive...","Extract to what directory...","C:\MYDIR")
  692. files = AskLine("Extracting from PAK archive...","Enter the FILES to extract (wildcards OK).","*.*")
  693.  
  694. ClipPut("E %newdrive% %files%") ;/path == with pathnames
  695. Call ("jwnprun.wbt","")
  696. goto end 
  697. exit
  698.  
  699. ;jwnarjndw
  700.